/* $Id$ */
package org.crazydays.gameplan.view;


import javax.swing.JMenu;
import javax.swing.JMenuItem;

import org.crazydays.gameplan.Controller;
import org.crazydays.i18n.Messages;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * ViewMenu
 */
public class ViewMenu
    extends JMenu
{
    /** serial version uid */
    public final static long serialVersionUID =
        "$Id: GamePlan.java 37 2009-08-15 23:19:07Z aaron.day $".hashCode();

    /** logger */
    protected final static Logger LOGGER =
        LoggerFactory.getLogger(FileMenu.class);

    /** messages */
    protected final static Messages messages = Messages.getInstance();

    /** controller */
    protected Controller controller;

    /**
     * ViewMenu constructor.
     * 
     * @param controller Controller
     */
    public ViewMenu(Controller controller)
    {
        super(messages.format("GamePlan.menu.view"));
        this.controller = controller;
        build();
    }

    /**
     * Build view menu.
     */
    protected void build()
    {
        add(new JMenuItem(controller.getActions().getToggleGrid()));
    }
}
